package org.example;

import cn.hserver.core.interfaces.InitRunner;
import cn.hserver.core.ioc.IocUtil;
import cn.hserver.core.ioc.annotation.Bean;
import cn.hserver.plugin.cloud.DiscoveryService;
import cn.hserver.plugin.rpc.core.RpcDisHandler;

@Bean
public class Init implements InitRunner {

    @Override
    public void init(String[] strings) {
        DiscoveryService DISCOVERY_SERVICE = IocUtil.getBean(DiscoveryService.DISCOVERY_SERVICE, DiscoveryService.class);
        DISCOVERY_SERVICE.subscribe("WEB", "web", RpcDisHandler.getRpcDisHandler());
    }

}
